package com.download.entity; 

/**
 *下载文件信息类  
 */
public class DownloadInfo {
    // 下载文件url
    private String url;
    // 下载文件名称
    private String fileName;
    // 下载文件保存路径
    private String filePath;
    // 分成多少段下载， 每一段用一个线程完成下载
    private int splitter;
    
    public DownloadInfo() {
    
    }
    
    /***
     * @param url 下载地址
     * @param fileName 文件名称
     * @param filePath 文件保存路径
     * @param splitter 分成多少段或是多少个线程下载
     */
    public DownloadInfo(String url, String fileName, String filePath, int splitter) {
        this.url = url;
        this.fileName = fileName;
        this.filePath = filePath;
        this.splitter = splitter;
    }
    
    public String getUrl() {
        return url;
    }
    
    public void setUrl(String url) {
        this.url = url;
    }
    
    public String getFileName() {
        return fileName;
    }
    
    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    
    public String getFilePath() {
        return filePath;
    }
    
    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
    
    public int getSplitter() {
        return splitter;
    }
    
    public void setSplitter(int splitter) {
        this.splitter = splitter;
    }
    
    @Override
    public String toString() {
        return this.url + "#" + this.fileName + "#" + this.filePath + "#" + this.splitter;
    }
}
 